1. Field of the Invention
The present invention concerns a method of looking up a telephone number in a telephone directory in an electronic memory. The invention finds one application in telephone terminals whether they are mobile, like GSM (Global System for Mobiles) mobile terminals, or fixed.
2. Description of the Prior Art
When a telephone terminal receives an incoming call, it can offer the service of displaying the name of the calling party rather than their telephone number.
To this end the telephone terminal can hold in an electronic memory a telephone directory enabling it to establish the correspondence between the telephone number and the name of the person.
There are already methods of establishing this correspondence quickly.
FIG. 1 shows one particular method, for example. Its principle is to compare the calling party number and each of the numbers stored in the directory in two stages in order to optimize the searching time.
To this end, a telephone number is considered to comprise three parts: a suffix, a central part and a prefix. The division between the central part and the suffix is arbitrary. For example, the prefix can be considered to consist of the last four digits and the central part of the following digits. The suffix can also be considered to be of zero size, which amounts to considering only two parts: the prefix and the central part.
The prefix is formed of header digits that are governed by international or regional considerations.
In the prior art method a first number is chosen in the telephone directory in step 1 in FIG. 1. A first comparison is then effected in step 2, based on the suffixes of the two numbers to be compared (i.e. the calling party's number and the number previously chosen).
If the comparison fails step 4 is executed to determine if there are telephone numbers in the telephone directory that have not yet been chosen. If there are any the method loops to step 1 of choosing the number; otherwise it stops on a failure.
If the comparison of the two suffixes succeeds, a second comparison is effected on the central part and the suffix (step 3 in FIG. 1). If this comparison fails step 4 is executed, as previously. If it succeeds, the process stops with the last number chosen as the result.
The manner in which the numbers are chosen in step 1 of the method is immaterial. It can be by a sequential choice in the telephone directory, for example.
Nevertheless, this prior art method is inadequate given the possible multiplicity of prefixes for the same telephone number. At present there is no standard covering these prefixes and their content varies for the same number depending on the telecommunication network concerned.
For example, a user residing in Italy has a mobile telephone with the number "01xxxxxxxx". The same user, on traveling to France, calls another user and their calling party's number is "01xxxxxxxx".
If "+391xxxxxxxx" is the number contained in the directory of this other user (39 being the international code for Italy) the prior art method will be incapable of finding the number "01xxxxxxxx" on receiving the call.
The aim of the present invention is therefore to solve the problem raised by the multiple prefixes of a telephone number.